<?php
ini_set('soap.wsdl_cache_enabled', '0');
require_once('../class/config.php');

$date = date('Y-m-d H:i:s');
$hour = date('Y-m-d H:i:s');
$hourlyValue = '123';
$networkOwnerID = 'T2NO2';

$loadProfile = new Client_RK2_saveLoadProfile($date, $hour, $hourlyValue, $networkOwnerID);

$startDate = date('Y-m-d H:i:s');
$endDate = date('Y-m-d H:i:s');
$entryPoint = 123.12;
$exitPoint = 231.12;
$networkOwnerID = SERVICE_NO_ID;
$electricitySupplierID = 'T2ES1';
$userID = 'User';
$constraintAreaID = '12';

$meteredData = new Client_RK2_saveMeteredData($startDate, $endDate, $entryPoint, $exitPoint, $networkOwnerID, $electricitySupplierID, $userID, $constraintAreaID);

$networkOwnerId = SERVICE_NO_ID;
$electricitySupplierId = 'T2ES1';
$balanceProviderId = null;
$profileSettlementAreaId = '12';
$calculationStage = 'final';
$supplyMonth = date('Y-m-d H:i:s');
$highLoadProfileShare = 123.45;
$lowLoadProfileShare = 54.321;

$networkOwnerID = SERVICE_NO_ID;
$electricitySupplierID = 'T2ES1';
$balanceProviderID = null;
$profileSettlementAreaID = '12';
$calculationStage = 'final';
$supplyMonth = date('Y-m-d H:i:s');
$highLoadValue = 123.45;
$lowLoadValue = 54.321;
$loadProfileShare = new Client_RK2_saveLoadProfileShare($networkOwnerID, $electricitySupplierID, $balanceProviderID, $profileSettlementAreaID, $calculationStage, $supplyMonth, $highLoadValue, $lowLoadValue);

$client = new Client_RK2();


echo $client->sendLoadProfile($loadProfile) ? 'OK' : 'NOT';
print_r($client->result);


/*
echo $client->sendMeterReading($meteredData) ? 'OK' : 'NOT';
print_r($client->result);
*/

/*
echo $client->sendLoadProfileShare($loadProfileShare) ? 'OK' : 'NOT';
print_r($client->result);
*/


/*
$soapClient = new Client_RK2_T2RK2();
//var_dump($soapClient->__getFunctions());

try {
    print_r($soapClient->saveMeteredData($meteredData));
} catch (SoapFault $exception) {
    print_r($exception);
}
*/
